<!DOCTYPE html>
<meta charset="utf-8">
<title>document.createCDATASection must throw in HTML documents</title>
<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-createcdatasection">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
"use strict";

assert_throws("NotSupportedError", () => document.createCDATASection("foo"));

done();
</script>
